var date="2017-11-9";
date = new Date(Date.parse(date.replace(/-/g, "/")));
// var date="2017/11/9";
// date = new Date(date);

date = date.getTime();
        
var timestamp = Date.parse(new Date())
// // timestamp += 7*24*60*60*1000
console.log((timestamp-date)/(1000*60*60));

console.log(timestamp);
console.log(date);